package 代码记录.指定公司代码练习记录.西安.分值100分.自己肯定做的出来;

import java.util.Scanner;

/**
 * @author zx
 * @create 2023-07-03 19:57
 * 自己的做法：暴力
 */
public class 乱序整数序列两数之和绝对值最小 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String[] temp = str.split(" ");
        int[] arr = new int[temp.length];
        for(int i = 0;i < arr.length;i++){
            arr[i] = Integer.parseInt(temp[i]);
        }
        int one = 0, two = 0;
        int and = Integer.MAX_VALUE;
        for(int i = 0;i < arr.length;i++){
            for(int j = i + 1;j < arr.length;j++){
                if(Math.abs(arr[i] + arr[j]) < and){
                    one = arr[i];
                    two = arr[j];
                    and = Math.abs(arr[i] + arr[j]);
                }
            }
        }
        System.out.println(one + " " + two + " " + Math.abs(and));
    }
}
